﻿using Shop.Core.Share;
using Shop.Model.Dto.Car;
using Shop.Model.Dto.Goo;
using Shop.Model.View.Car;

namespace Shop.IServices;

public interface IShopCartAppService: IAppService
{
    /// <summary>
    /// 添加商品到购物车
    /// </summary>
    /// <param name="uId"></param>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<bool> AddProduct(long uId, ProductAddDto dto);

    /// <summary>
    /// 删除购物车商品
    /// </summary>
    /// <param name="uId"></param>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<bool> DeleteProduct(long uId, DeleteProductDto dto);

    /// <summary>
    /// 修改购物车商品规格
    /// </summary>
    /// <param name="uId"></param>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<bool> UpdateProduct(long uId, ProductModifyDto dto);

    /// <summary>
    /// 获取用户购物车商品信息
    /// </summary>
    /// <param name="uId"></param>
    /// <param name="language"></param>
    /// <returns></returns>
    Task<PageModel<ProductListVo>> GetProductList(long uId, PageSearchModel<string> language);

    /// <summary>
    /// 商品规格集合
    /// </summary>
    /// <param name="uId"></param>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<GooSizeVo> GooSize(long uId, GooSizeDto dto);

    /// <summary>
    /// 修改购物车商品数量
    /// </summary>
    /// <param name="uId"></param>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<bool> UpdateCount(long uId, UpdateCountDto dto);
}